import { RouterView } from 'vue-router';
import Layout from '../layouts/index.vue';

export const routes = [
  {
    path: '/',
    name: 'DEFAULT_LAYOUT',
    component: Layout,
    redirect: '/first',
    children: [
      {
        path: '/basic',
        name: 'Basic',
        meta: {
          title: '基础学习',
        },
        component: RouterView,
        children: [
          {
            path: '/first',
            name: 'First',
            meta: {
              title: '地图显示',
            },
            component: () => import('@/views/basic/First.vue'),
          },
          {
            path: '/right',
            name: 'Right',
            meta: {
              title: '右键控制相机视角',
            },
            component: () => import('@/views/basic/Right.vue'),
          },
          {
            path: '/entity',
            name: 'Entity',
            meta: {
              title: '实体显示-点',
            },
            component: () => import('@/views/basic/Entity.vue'),
          },
          {
            path: '/transform',
            name: 'Transform',
            meta: {
              title: '坐标系转换',
            },
            component: () => import('@/views/basic/Transform.vue'),
          },
          {
            path: '/flyto',
            name: 'FlyTo',
            meta: {
              title: '视角转换',
            },
            component: () => import('@/views/basic/FlyTo.vue'),
          },
        ],
      },
      {
        path: '/layer',
        name: 'Layer',
        meta: {
          title: '图层相关',
        },
        component: RouterView,
        children: [
          {
            path: '/images',
            name: 'Images',
            meta: {
              title: '影像',
            },
            component: () => import('@/views/layer/Image.vue'),
          },
        ],
      },
    ],
  },
];
